﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;

namespace SplenetiX
{
    static class Constant
    {
        //Jeu
        public static bool music = false;

        //Fenetre
        static int heigth = 600;
        static int width = 800;
        static int tileSize = 32;
        static bool isFullscreen = false;

        //Adresse de la sauvegarde
        static string savePath = "save\\save.spx";

        //Physique
        static float gravity = 12f;
        static float maxFallSpeed = 10f;
        static float jumpIntensity = 22f;
        static int levelRight;
        static int levelBottom;

        //Joueur
        static float playerHealth = 100f;
        static float basicDamage = 5f;
        static float playerSpeed = 0.2f;
        static float shootInterval = 140f; //Milliseconds

        //Projectile
        static float projectileVelocity = 1f;
        static float maxRange = 350f;

        //Ennemi
        static float distanceEngagement = 300f;
        static float distanceDeplacement = 200f;
        static float ennemiSpeed = 0.1f;
        static float followInterval = 1500f; //Milliseconds
        static float damageRanged = 2.5f;
        static float basicHealth = 30f;

        //Content
        static Texture2D spriteProj;

        //Level
        static Vector2 entryPoint = new Vector2(10,10);
        static Vector2 endPoint = Vector2.Zero;

        //Geters
        public static int Heigth { get { return heigth; } }
        public static int Width { get { return width; } }
        public static int TileSize { get { return tileSize; } }
        public static string SavePath { get { return savePath; } }
        public static float Gravity { get { return gravity; } }
        public static float MaxFallSpeed { get { return maxFallSpeed; } }
        public static float JumpIntensity { get { return jumpIntensity; } }
        public static float PlayerHealth { get { return playerHealth; } }
        public static float BasicDamage { get { return basicDamage; } }
        public static float PlayerSpeed { get { return playerSpeed; } }
        public static float ProjectileVelocity { get { return projectileVelocity; } }
        public static float MaxRange { get { return maxRange; } }
        public static Texture2D SpriteProj { get { return spriteProj; } }
        public static float ShootInterval { get { return shootInterval; } }
        public static bool IsFullscreen { get { return isFullscreen; } }
        public static float DistanceEngagement { get { return distanceEngagement; } }
        public static float EnnemiSpeed { get { return ennemiSpeed; } }
        public static int LevelRight { get { return levelRight; } set { levelRight = value; } }
        public static int LevelBottom { get { return levelBottom; } set { levelBottom = value; } }
        public static float DistanceDeplacement { get { return distanceDeplacement; } }
        public static float FollowInterval { get { return followInterval; } }
        public static float DamageRanged { get { return damageRanged; } }
        public static float BasicHealth { get { return basicHealth; } }

        public static Vector2 EntryPoint
        {
            get { return entryPoint; }
            set { entryPoint = value; }
        }

        public static Vector2 EndPoint
        {
            get { return endPoint; }
            set { endPoint = value; }
        }

        public static void LoadConst(ContentManager content)
        {
            spriteProj = content.Load<Texture2D>("Anim_Personnage//projectile");
        }

        public static void SetGravity(float g)
        {
            gravity = (g > 0) ? g : 12f;
        }
    }
}
